{% extends "base.html" %}

{% block css %}
<link rel="stylesheet" href="/static/css/curator.css" />
{% endblock %}

{% block content %}

<form class="form-horizontal" method="POST" action="/profile">
    <input type="hidden" name="action" value="add_tag" />
  <fieldset>
    <legend>Set up tagging options</legend>
    <div class="control-group">
      <label for="input01" class="control-label">Name</label>
      <div class="controls">
        <input type="text" name="tag_name" id="input01" class="input-xlarge">
        <p class="help-block">Add a tag name in the curation interface.</p>
      </div>
    </div>
    <div class="form-actions">
      <button class="btn btn-primary" type="submit">Save Tag</button>
    </div>
  </fieldset>
</form>


<h3>All Existing Tags</h3>
<table class="table">
  <thead>
    <tr>
      <th>Tag Name</th>
      <th>Actions</th>
    </tr>
  </thead>
  {% for tag in tags %}
  <tr>
  <form class="form-horizontal" method="POST" action="/profile">
    <input type="hidden" name="action" value="del_tag" />
    <td><input type="hidden" name="tag_name" value="{{tag.name}}">{{tag.name}} {% if tag.associate_to_playlist %} (<i class="icon-exclamation-sign"> This tag is associated with a playlist and can cannot be deleted) {% endif %}</td>
    <td><button class="btn btn-primary" type="submit">Delete</button></td>
  </form>
  </tr>
  {% endfor %}
</table>


{% endblock %}
